home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / oath.lha / oath / test / biread.cc < prev    next >
C/C++ Source or Header  |  1991-08-29  |  517b  |  23 lines

  1. #include "oath/bigInteger.h"
  2.  
  3. #include <fstream.h>
  4.  
  5. main(int argc, char **argv)
  6.    {if(argc != 3)
  7.        {cout << argv[0] << " reads two bigInteger's and produces sums.\n";
  8.         cout << "Usage: " << argv[0] << " <integer> <integer>\n";
  9.         exit(1);
  10.        }
  11.  
  12.     bigIntegerA X = bigIntegerA::make(argv[1]);
  13.     bigIntegerA Y = bigIntegerA::make(argv[2]);
  14.  
  15.     cout << "   X = " << X << endl;
  16.     cout << "   Y = " << Y << endl;
  17.  
  18.     ofstream File ("biread.obj");
  19.  
  20.     X.export(File);
  21.     Y.export(File);
  22.    }
  23.